package org.jwd.storage.runner;

import lombok.extern.slf4j.Slf4j;
import org.jwd.storage.service.DataDictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @author vizz
 * @since 2022/5/20 10:57
 */
@Slf4j
@Component
public class DataDictRunner implements CommandLineRunner {

    @Autowired
    private DataDictService dataDictService;

    @Override
    public void run(String... args) {
        try {
            dataDictService.initDict();
        } catch (Exception e) {
            log.error("init error", e);
        }
    }
}
